package com.injury.hunan.action.system;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.injury.hunan.entity.system.Menu;

@RequestMapping("menu")
@Controller
public class MenuAction {

	
	@RequestMapping("test.do")
	@ResponseBody
	public String test() {

		return "hello";
	}
	
	@RequestMapping("excep.do")
	public void testException(){
		throw new RuntimeException("test 4 excep");
	}
	
	@RequestMapping("menu.do")
	@ResponseBody
	public Menu getMenu() {

		Menu menu = new Menu();
		menu.setIcon("upload/images/123.jpg");
		menu.setMenuName("xx photo");
		menu.setUrl("http://xxx/xx/xx.html");
		return menu;
	}

}
